Tables [dbo].[MatchingGiftPlan]
Properties
PropertyValue
Created10:31:27 AM Tuesday, March 02, 2010
Last Modified1:20:15 PM Thursday, February 23, 2012
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_MatchingGiftPlan: MatchingGiftPlanKeyForeign Keys FK_MatchingGiftPlan_UniformRegistry: [dbo].[UniformRegistry].MatchingGiftPlanKeyMatchingGiftPlanKeyuniqueidentifier16
No
Namenvarchar(50)100
No
PlanProcedurenvarchar(200)400
Yes
RulesDescriptionnvarchar(200)400
Yes
Foreign Keys FK_MatchingGiftPlan_ContactMain_Owner: [dbo].[ContactMain].OwnerContactKeyIndexes IX_MatchingGiftPlan_OwnerContactKey: OwnerContactKeyOwnerContactKeyuniqueidentifier16
No
MatchingRatiodecimal(12,4)9
No
((1))
EffectiveDatedatetime8
Yes
TerminationDatedatetime8
Yes
Foreign Keys FK_MatchingGiftPlan_MatchingGiftPlanTypeRef: [dbo].[MatchingGiftPlanTypeRef].MatchingGiftPlanTypeKeyIndexes IX_MatchingGiftPlan_MatchingGiftPlanTypeKey: MatchingGiftPlanTypeKeyMatchingGiftPlanTypeKeyuniqueidentifier16
No
IsPledgeQualifiedbit1
No
((1))
IsGiftQualifiedbit1
No
((1))
Foreign Keys FK_MatchingGiftPlan_ContactMain_MatchingGift: [dbo].[ContactMain].MatchingGiftContactKeyIndexes IX_MatchingGiftPlan_MatchingGiftContactKey: MatchingGiftContactKeyMatchingGiftContactKeyuniqueidentifier16
Yes
Foreign Keys FK_MatchingGiftPlan_ContactMain_CorprateGift: [dbo].[ContactMain].CorporateGiftContactKeyIndexes IX_MatchingGiftPlan_CorporateGiftContactKey: CorporateGiftContactKeyCorporateGiftContactKeyuniqueidentifier16
Yes
IsAutomatchbit1
No
((1))
MatchingModeint4
No
((0))
PreferredMatchingProductKeyuniqueidentifier16
Yes
MaximumMatchAmountdecimal(18,4)9
Yes
MaximumMatchPeriodint4
Yes
Foreign Keys FK_MatchingGiftPlan_UserMain_UpdatedBy: [dbo].[UserMain].UpdatedByUserKeyIndexes IX_MatchingGiftPlan_UpdatedByUserKey: UpdatedByUserKeyUpdatedByUserKeyuniqueidentifier16
No
UpdatedOndatetime8
No
Foreign Keys FK_MatchingGiftPlan_AccessMain: [dbo].[AccessMain].AccessKeyIndexes IX_MatchingGiftPlan_AccessKey: AccessKeyAccessKeyuniqueidentifier16
No
Foreign Keys FK_MatchingGiftPlan_UserMain_CreatedBy: [dbo].[UserMain].CreatedByUserKeyIndexes IX_MatchingGiftPlan_CreatedByUserKey: CreatedByUserKeyCreatedByUserKeyuniqueidentifier16
No
CreatedOndatetime8
No
Foreign Keys FK_MatchingGiftPlan_SystemEntity: [dbo].[SystemEntity].SystemEntityKeyIndexes IX_MatchingGiftPlan_SystemEntityKey: SystemEntityKeySystemEntityKeyuniqueidentifier16
No
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_MatchingGiftPlan: MatchingGiftPlanKeyPK_MatchingGiftPlanMatchingGiftPlanKey
Yes
IX_MatchingGiftPlan_AccessKeyAccessKey
IX_MatchingGiftPlan_CorporateGiftContactKeyCorporateGiftContactKey
IX_MatchingGiftPlan_CreatedByUserKeyCreatedByUserKey
IX_MatchingGiftPlan_MatchingGiftContactKeyMatchingGiftContactKey
IX_MatchingGiftPlan_MatchingGiftPlanTypeKeyMatchingGiftPlanTypeKey
IX_MatchingGiftPlan_OwnerContactKeyOwnerContactKey
IX_MatchingGiftPlan_SystemEntityKeySystemEntityKey
IX_MatchingGiftPlan_UpdatedByUserKeyUpdatedByUserKey
Foreign Keys Foreign Keys
NameColumns
FK_MatchingGiftPlan_AccessMainAccessKey->[dbo].[AccessMain].[AccessKey]
FK_MatchingGiftPlan_ContactMain_CorprateGiftCorporateGiftContactKey->[dbo].[ContactMain].[ContactKey]
FK_MatchingGiftPlan_ContactMain_MatchingGiftMatchingGiftContactKey->[dbo].[ContactMain].[ContactKey]
FK_MatchingGiftPlan_ContactMain_OwnerOwnerContactKey->[dbo].[ContactMain].[ContactKey]
FK_MatchingGiftPlan_MatchingGiftPlanTypeRefMatchingGiftPlanTypeKey->[dbo].[MatchingGiftPlanTypeRef].[MatchingGiftPlanTypeKey]
FK_MatchingGiftPlan_SystemEntitySystemEntityKey->[dbo].[SystemEntity].[SystemEntityKey]
FK_MatchingGiftPlan_UniformRegistryMatchingGiftPlanKey->[dbo].[UniformRegistry].[UniformKey]
FK_MatchingGiftPlan_UserMain_CreatedByCreatedByUserKey->[dbo].[UserMain].[UserKey]
FK_MatchingGiftPlan_UserMain_UpdatedByUpdatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[MatchingGiftPlan]
(
[MatchingGiftPlanKey] [uniqueidentifier] NOT NULL,
[Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PlanProcedure] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RulesDescription] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OwnerContactKey] [uniqueidentifier] NOT NULL,
[MatchingRatio] [decimal] (12, 4) NOT NULL CONSTRAINT [DF_MatchingGiftPlan_MatchingRatio] DEFAULT ((1)),
[EffectiveDate] [datetime] NULL,
[TerminationDate] [datetime] NULL,
[MatchingGiftPlanTypeKey] [uniqueidentifier] NOT NULL,
[IsPledgeQualified] [bit] NOT NULL CONSTRAINT [DF_MatchingGiftPlan_IsPledgeQualified] DEFAULT ((1)),
[IsGiftQualified] [bit] NOT NULL CONSTRAINT [DF_MatchingGiftPlan_IsGiftQualified] DEFAULT ((1)),
[MatchingGiftContactKey] [uniqueidentifier] NULL,
[CorporateGiftContactKey] [uniqueidentifier] NULL,
[IsAutomatch] [bit] NOT NULL CONSTRAINT [DF_MatchingGiftPlan_IsAutomatch] DEFAULT ((1)),
[MatchingMode] [int] NOT NULL CONSTRAINT [DF_MatchingGiftPlan_MatchingMode] DEFAULT ((0)),
[PreferredMatchingProductKey] [uniqueidentifier] NULL,
[MaximumMatchAmount] [decimal] (18, 4) NULL,
[MaximumMatchPeriod] [int] NULL,
[UpdatedByUserKey] [uniqueidentifier] NOT NULL,
[UpdatedOn] [datetime] NOT NULL,
[AccessKey] [uniqueidentifier] NOT NULL,
[CreatedByUserKey] [uniqueidentifier] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[SystemEntityKey] [uniqueidentifier] NOT NULL,
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [PK_MatchingGiftPlan] PRIMARY KEY CLUSTERED ([MatchingGiftPlanKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_AccessKey] ON [dbo].[MatchingGiftPlan] ([AccessKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_CorporateGiftContactKey] ON [dbo].[MatchingGiftPlan] ([CorporateGiftContactKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_CreatedByUserKey] ON [dbo].[MatchingGiftPlan] ([CreatedByUserKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_MatchingGiftContactKey] ON [dbo].[MatchingGiftPlan] ([MatchingGiftContactKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_MatchingGiftPlanTypeKey] ON [dbo].[MatchingGiftPlan] ([MatchingGiftPlanTypeKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_OwnerContactKey] ON [dbo].[MatchingGiftPlan] ([OwnerContactKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_SystemEntityKey] ON [dbo].[MatchingGiftPlan] ([SystemEntityKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_MatchingGiftPlan_UpdatedByUserKey] ON [dbo].[MatchingGiftPlan] ([UpdatedByUserKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_AccessMain] FOREIGN KEY ([AccessKey]) REFERENCES [dbo].[AccessMain] ([AccessKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_ContactMain_CorprateGift] FOREIGN KEY ([CorporateGiftContactKey]) REFERENCES [dbo].[ContactMain] ([ContactKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_ContactMain_MatchingGift] FOREIGN KEY ([MatchingGiftContactKey]) REFERENCES [dbo].[ContactMain] ([ContactKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_ContactMain_Owner] FOREIGN KEY ([OwnerContactKey]) REFERENCES [dbo].[ContactMain] ([ContactKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_MatchingGiftPlanTypeRef] FOREIGN KEY ([MatchingGiftPlanTypeKey]) REFERENCES [dbo].[MatchingGiftPlanTypeRef] ([MatchingGiftPlanTypeKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_SystemEntity] FOREIGN KEY ([SystemEntityKey]) REFERENCES [dbo].[SystemEntity] ([SystemEntityKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_UniformRegistry] FOREIGN KEY ([MatchingGiftPlanKey]) REFERENCES [dbo].[UniformRegistry] ([UniformKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_UserMain_CreatedBy] FOREIGN KEY ([CreatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
ALTER TABLE [dbo].[MatchingGiftPlan] ADD CONSTRAINT [FK_MatchingGiftPlan_UserMain_UpdatedBy] FOREIGN KEY ([UpdatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses
Used By